import cv2
img=cv2.imread("river.png")
dst1=cv2.flip(img,1)
dst2=cv2.flip(img,0)
dst3=cv2.flip(img,-1)
cv2.imshow("Input",img)
cv2.imshow("Flip1",dst1)
cv2.imshow("flip2",dst2)
cv2.imshow("flip3",dst3)
cv2.waitKey()
cv2.destroyALLWindows()

import cv2
import numpy as np
img=cv2.imread("apple.jpg")
rows=len(imgp[0])
M=np.float32([[1,0,50],
              [0,1,100]])
dst=cv2.warpAffine(img,M,(cole,rows))
cv2.imshow("Input",img)
cv2.imshow("Trans",dst)
cv2.waitKey()
cv2.destroyAllWindows()

import cv2
img=cv2.imread("apple.jpg")
rows=len(img)
cols=len(img[0])
center=(rows/2,cols/2)
M=cv2.getRotationMatrix2D(center,30,0.8)
dst=cv2.warpAffine(img,M,(cols,rows))
cv2.imshow("Input",img)
cv2.imshow("Rotate",dst)
cv2.waitKey()
cv2.destroyAllWindows()

import cv2
import numpy as np
img=cv2.imread("apple,jpg")
rows=len(img)
cols=len(img[0])
pl=np.float32([[0,0],[cols-1,0],[0,rows-1]])
p2=np.float32([[0,rows*0.33],[cols*0.85,rows*0.25],[cols*0.15,rows*0.7]])
M=cv2.getAffineTransform(p1,p2)
dst=cv2.warpaAffine(img,M,(cols,rows))
cv2.imshow("Incline",dst)
cv2.waitkey()
cv2.destroyAllWindows()